package my.diplom.dao.service;

import my.diplom.dao.IHostDAO;
import my.diplom.entity.Host;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: gb
 * Date: 03.11.2009
 * Time: 1:34:49
 * To change this template use File | Settings | File Templates.
 */
public class HostService {

    private IHostDAO hostDAO;

    public IHostDAO getHostDAO() {
        return hostDAO;
    }

    public void setHostDAO(IHostDAO hostDAO) {
        this.hostDAO = hostDAO;
    }

    public void create(Host host) {
        hostDAO.create(host);
    }

    public void update(Host host) {
        hostDAO.update(host);
    }

    public Host getById(Long hostId) {
        return hostDAO.getById(hostId);
    }

    public List<Host> getAll() {
        return hostDAO.getAll();
    }

    public void delete(Host host) {
        hostDAO.delete(host);
    }

    public Host getById(Long hostId, boolean initAll) {
        return hostDAO.getById(hostId, initAll);
    }

    public List<Host> getActiveHosts() {
        return hostDAO.getActiveHosts();
    }
}
